package com.zh.factorymode.demo.resultfactory;


public abstract class DefaultResultFactory<T> implements ResultDemo<T>{

    public DefaultResultFactory() {
    }

    private T unsupported(String sourceType){
        throw new UnsupportedOperationException("Data result unsupported: " + sourceType);
    }

    @Override
    public T CreateFromDate(int y, int m, int d) {
        return unsupported("DATE");
    }

    @Override
    public T CreateFromInt(Integer i) {
        return unsupported("INT");
    }
}
